
namespace Patterns4Net.Attributes.DesignPatterns
{
    using System;

    /// <summary>
    /// Use this attribute to annotate a type as an implementation of the Visitor design pattern.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
    public class VisitorAttribute : Attribute, IPatternAttribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="VisitorAttribute"/> class.
        /// </summary>
        /// <param name="visitableElementsRoot">
        /// The super interface or class of 
        /// all elements that can be visited by the Visitor. 
        /// </param>
        public VisitorAttribute(Type visitableElementsRoot)
        {            
        }

        /// <summary>
        /// Gets or sets the flag that indicates whether the implementation 
        /// of the Visitor pattern uses reflection. In such case nothing is 
        /// enforced by Pattern Enforcer. Default value is <c>false</c>.
        /// </summary>
        public bool IsReflective { get; set; }
    }
}
